package com.team.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.app.dao.RoleDao;
import com.team.app.model.Auth;
import com.team.app.model.Role;


@Service
public class RoleServiceImpl implements RoleService{
	@Autowired
    private RoleDao roleDao;     

	@Override
	@Transactional
	public Long create(Role obj) {
		// TODO Auto-generated method stub
		return roleDao.create(obj);
	}

	@Override
	@Transactional
	public void edit(Role obj) {
		// TODO Auto-generated method stub
		roleDao.edit(obj);
	}

	@Override
	@Transactional
	public void remove(Role obj) {
		// TODO Auto-generated method stub
		roleDao.remove(obj);
	}

	@Override
	@Transactional
	public Role find(Object id) {
		// TODO Auto-generated method stub
		return roleDao.find(id);
	}

	@Override
	@Transactional
	public List<Role> findAll() {
		// TODO Auto-generated method stub
		return roleDao.findAll();
	}
	@Override
	@Transactional
	public List<Role> findAll(Auth loginAuth,Role obj) {
		// TODO Auto-generated method stub
		return roleDao.findAll(loginAuth,obj);
	}
	
	@Override
	@Transactional
	public List<Role> findRange(int[] range) {
		// TODO Auto-generated method stub
		return roleDao.findRange(range);
	}

	@Override
	@Transactional
	public Long count() {
		// TODO Auto-generated method stub
		return roleDao.count();
	} 
}
